﻿<Window x:Class="MontagsmalerApp.Views.DrawWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:sys="clr-namespace:System;assembly=mscorlib" 
        xmlns:utils="clr-namespace:MontagsmalerApp.Utils"
        Title="Zeichenbrett" WindowStyle="ToolWindow" Closed="Window_Closed" Loaded="Window_Loaded" KeyUp="Window_KeyUp">
    <Window.Resources>
        <utils:IntTimeSpanToStringConverter x:Key="IntTimeSpanToStringConverter"/>
        <utils:InverseBooleanConverter x:Key="InverseBooleanConverter"/>
    </Window.Resources>
	<Grid>
		<Border CornerRadius="0" BorderThickness="100" BorderBrush="Transparent">
			<Grid>
				<Border BorderBrush="Salmon" BorderThickness="10" CornerRadius="20" >
					<Grid>
						<Image Name="imgVideo" Stretch="Fill"/>
						<InkCanvas Name="InkCanvas1" Margin="1" Background="Transparent"></InkCanvas>
					</Grid>
				</Border>
                <Border BorderBrush="Lime" BorderThickness="10" Margin="0,-80,249,0" Width="108" Height="68" CornerRadius="20" VerticalAlignment="Top" HorizontalAlignment="Left" Background="Silver">
                    <Label Name="lblRichtig" Content="{Binding RichtigeAntworten}" FontFamily="Maiandra GD" FontSize="48" FontWeight="Bold" HorizontalContentAlignment="Center" Margin="0,-8,0,0" />
				</Border>
				<Border BorderBrush="LightBlue" BorderThickness="10" Margin="0,-80,0,0" Width="Auto" Height="68" CornerRadius="20" VerticalAlignment="Top" HorizontalAlignment="Center" Background="Silver">
                    <Label Name="LTimer" Content="{Binding VerbleibendeSekundenMalrunde, Converter={StaticResource IntTimeSpanToStringConverter}}" Height="58" FontWeight="Bold" Margin="20,-8,20,0" FontFamily="Maiandra GD" FontSize="48"/>
				</Border>
				<Border BorderBrush="Red" BorderThickness="10" Margin="0,-80,1,0" Width="108" Height="68" CornerRadius="20" VerticalAlignment="Top" HorizontalAlignment="Right" Background="Silver">
                    <Label Name="lblFalsch" Content="{Binding FalscheAntworten}" FontFamily="Maiandra GD" FontSize="48" FontWeight="Bold" Height="68" HorizontalContentAlignment="Center" Margin="0,-8,0,0" />
				</Border>
                <Label Name="lblBegriffID" Content="{Binding AktuellerBegriff.ID}" FontFamily="Maiandra GD" FontSize="48" FontWeight="Bold" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0,-79,-280,0" />
            </Grid>
		</Border>
        <TextBlock Text="ENDE!" HorizontalAlignment="Center" Name="TBEnde" VerticalAlignment="Center" FontFamily="Maiandra GD" FontSize="56" FontWeight="Bold" FontStyle="Normal" Foreground="#FFCBCBCB" TextAlignment="Center">
            <TextBlock.Triggers>
            <EventTrigger RoutedEvent="TextBlock.Loaded"> 
                    <EventTrigger.Actions> 
                        <BeginStoryboard> 
                            <Storyboard BeginTime="00:00:00"  
                                        RepeatBehavior="Forever"  
                                        Storyboard.TargetName="TBEnde"  
                                        Storyboard.TargetProperty="(Foreground).(SolidColorBrush.Color)"> 
                                 <ColorAnimation From="Black" To="White" Duration="0:0:4"/> 
                            </Storyboard> 
                        </BeginStoryboard> 
                    </EventTrigger.Actions> 
                </EventTrigger>
                </TextBlock.Triggers>
		</TextBlock>
        <Border BorderBrush="DarkBlue" BorderThickness="10"  Margin="100,0,100,30" Height="68" CornerRadius="20" VerticalAlignment="Bottom" HorizontalAlignment="Stretch" Background="Silver">
            <Grid>
            <ListView Height="60" HorizontalAlignment="Center" Name="lvPunkte" VerticalAlignment="Center" ItemsSource="{Binding Spielerverwaltung.Spielerteams}" Background="{x:Null}" BorderBrush="{x:Null}" SelectedItem="{Binding AktuellerSpieler}">
                <ListView.ItemsPanel>
                    <ItemsPanelTemplate>
                        <VirtualizingStackPanel Orientation="Horizontal" VerticalAlignment="Top"/>
                    </ItemsPanelTemplate>
                </ListView.ItemsPanel>
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <Label Content="{Binding NamePunkte}" FontFamily="Maiandra GD" FontSize="36" FontWeight="Bold" />
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>
                <Rectangle>
                    <Rectangle.Fill>
                        <SolidColorBrush />
                    </Rectangle.Fill>
                </Rectangle>
            </Grid>
        </Border>
        <Label Content="http://pc398:8091/" HorizontalAlignment="Stretch" Name="LWebServerInfo" VerticalAlignment="Bottom" FontFamily="Maiandra GD" FontSize="24" HorizontalContentAlignment="Center" Margin="0,0,0,-1" FontWeight="ExtraBold" Foreground="#FF0D0D0D">
			<Label.Triggers>
				<EventTrigger RoutedEvent="Label.Loaded">
					<EventTrigger.Actions>
						<BeginStoryboard>
							<Storyboard BeginTime="00:00:00"  
                                        RepeatBehavior="Forever"  
                                        Storyboard.TargetName="LWebServerInfo"  
                                        Storyboard.TargetProperty="(Foreground).(SolidColorBrush.Color)" AutoReverse="True">
								<ColorAnimation From="Black" To="Brown" Duration="0:0:5"/>
							</Storyboard>
						</BeginStoryboard>
					</EventTrigger.Actions>
				</EventTrigger>
			</Label.Triggers>
		</Label>
        <ProgressBar Name="progressBar1" Width="40" Orientation="Vertical" Value="{Binding VerbleibendeSekundenBegriff}" Maximum="{Binding MaximaleSekundenBegriff}" HorizontalAlignment="Left" Margin="30,100,0,100" Background="{x:Null}" Foreground="Black" IsIndeterminate="{Binding MalrundeLaeuftGerade, Converter={StaticResource InverseBooleanConverter}}" />
        <ProgressBar Name="progressBar2" Width="40" Orientation="Vertical" Value="{Binding VerbleibendeSekundenBegriff}" Maximum="{Binding MaximaleSekundenBegriff}" HorizontalAlignment="Right" Margin="0,100,30,100" Background="{x:Null}" Foreground="Black" IsIndeterminate="{Binding MalrundeLaeuftGerade, Converter={StaticResource InverseBooleanConverter}}"/>
    </Grid>
</Window>
